ServiceStackController<T>
Assembly: ServiceStack.Mvc.dll
View Source
Declaration
public abstract class ServiceStackController<T> : ServiceStackController, IHasServiceStackProvider where T : IAuthSession
Properties
UserSession
View Source
Declaration
protected T UserSession { get; }
AuthSession
View Source
Declaration
public IAuthSession AuthSession { get; }
Inherited Properties
AppSettings
View Source
Declaration
public virtual IAppSettings AppSettings { get; }
AuthenticationErrorResult
To change the error result when authentication (ServiceStack.AuthenticateAttribute) fails. Override this property and return the appropriate result.
View Source
Declaration
public virtual ActionResult AuthenticationErrorResult { get; }
AuthorizationErrorResult
To change the error result when authorization fails to something else, override this property and return the appropriate result.
View Source
Declaration
public virtual ActionResult AuthorizationErrorResult { get; }
AuthRepository
View Source
Declaration
public virtual IAuthRepository AuthRepository { get; }
AuthRepositoryAsync
View Source
Declaration
public virtual IAuthRepositoryAsync AuthRepositoryAsync { get; }
Cache
View Source
Declaration
public virtual ICacheClient Cache { get; }
CacheAsync
View Source
Declaration
public virtual ICacheClientAsync CacheAsync { get; }
Db
View Source
Declaration
public virtual IDbConnection Db { get; }
ForbiddenErrorResult
To change the error result when user doesn't have required role or permissions (ServiceStack.RequiredRoleAttribute). Override this property and return the appropriate result.
View Source
Declaration
public virtual ActionResult ForbiddenErrorResult { get; }
ForbiddenRedirectUrl
Default redirect URL if Required Role or Permission attributes doesn't permit access.
View Source
Declaration
public virtual string ForbiddenRedirectUrl { get; }
Gateway
View Source
Declaration
public virtual IServiceGateway Gateway { get; }
IsAuthenticated
View Source
Declaration
public virtual bool IsAuthenticated { get; }
MessageProducer
View Source
Declaration
public virtual IMessageProducer MessageProducer { get; }
Redis
View Source
Declaration
public virtual IRedisClient Redis { get; }
RpcGateway
View Source
Declaration
public virtual RpcGateway RpcGateway { get; }
ServiceStackProvider
View Source
Declaration
public virtual IServiceStackProvider ServiceStackProvider { get; }
ServiceStackRequest
View Source
Declaration
public virtual IHttpRequest ServiceStackRequest { get; }
ServiceStackResponse
View Source
Declaration
public virtual IHttpResponse ServiceStackResponse { get; }
SessionBag
View Source
Declaration
public virtual ISession SessionBag { get; }
SessionBagAsync
View Source
Declaration
public virtual ISessionAsync SessionBagAsync { get; }
SessionFactory
View Source
Declaration
public virtual ISessionFactory SessionFactory { get; }
UnauthorizedRedirectUrl
Default redirect URL if [Authenticate] attribute doesn't permit access.
View Source
Declaration
public virtual string UnauthorizedRedirectUrl { get; }
Inherited Methods
ClearSession()
View Source
Declaration
protected virtual void ClearSession()
ClearSessionAsync(CancellationToken)
View Source
Declaration
protected virtual Task ClearSessionAsync(CancellationToken token = null)
Returns
Task
Parameters
Type | Name |
---|---|
CancellationToken | token |
Dispose(Boolean)
View Source
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name |
---|---|
System.Boolean | disposing |
EndServiceStackRequest()
View Source
Declaration
protected virtual void EndServiceStackRequest()
GetSession(Boolean)
View Source
Declaration
protected virtual IAuthSession GetSession(bool reload = true)
Returns
ServiceStack.Auth.IAuthSession
Parameters
Type | Name |
---|---|
System.Boolean | reload |
GetSessionAsync(Boolean, CancellationToken)
View Source
Declaration
protected virtual Task<IAuthSession> GetSessionAsync(bool reload = false, CancellationToken token = null)
Returns
Task<ServiceStack.Auth.IAuthSession>
Parameters
Type | Name |
---|---|
System.Boolean | reload |
CancellationToken | token |
Json(Object)
View Source
Declaration
public override JsonResult Json(object data)
Returns
JsonResult
Parameters
Type | Name |
---|---|
System.Object | data |
SaveSession(IAuthSession, Nullable<TimeSpan>)
View Source
Declaration
protected virtual void SaveSession(IAuthSession session, TimeSpan? expiresIn = null)
Parameters
Type | Name |
---|---|
ServiceStack.Auth.IAuthSession | session |
System.Nullable<TimeSpan> | expiresIn |
SaveSessionAsync(IAuthSession, Nullable<TimeSpan>, CancellationToken)
View Source
Declaration
protected virtual Task SaveSessionAsync(IAuthSession session, TimeSpan? expiresIn = null, CancellationToken token = null)
Returns
Task
Parameters
Type | Name |
---|---|
ServiceStack.Auth.IAuthSession | session |
System.Nullable<TimeSpan> | expiresIn |
CancellationToken | token |
SessionAs<TUserSession>()
View Source
Declaration
protected virtual TUserSession SessionAs<TUserSession>()
Returns
<TUserSession>
Type Parameters
TUserSession
SessionAsAsync<TUserSession>(CancellationToken)
View Source
Declaration
protected virtual Task<TUserSession> SessionAsAsync<TUserSession>(CancellationToken token = null)
Returns
Task<<TUserSession>>
Parameters
Type | Name |
---|---|
CancellationToken | token |
Type Parameters
TUserSession